<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link href="../../build/common/base.css" rel="stylesheet">

  <link rel="stylesheet" href="../../build/form/form.css">
  <link rel="stylesheet" href="../../build/form/page.css">
  <link rel="stylesheet" href="../../build/form/preview.css">
  <link rel="stylesheet" href="../../assets/js/plugins/icheck/skins/all.css">
  <script type="text/javascript" src="../../build/common/base.js"></script>
  <script type="text/javascript" src="../../build/common/vueEdit.js"></script>
  <script src="../../assets/js/common/element/index.js"></script>

  <style>
    * {
      padding: 0px;
      margin: 0px;
    }

    ul li {
      list-style: none;
    }

    .my_cols {
      margin: 20px 0;
    }

    .my_box {
      height: calc(100% - 43px);
    }

    .my_table thead th {
      white-space: nowrap;
    }

    /* white-space:nowrap; */
  </style>
</head>

<body>
  <div id="ctrlC" style="padding: 0 30px;">
    <button @click="handCols()" class="btn btn-primary mt20">返回</button>
    <div style="font-size: 20px;text-align: center;">服务库</div>
    <table class="my_table table table-striped table-bordered table_hover text-center">
      <thead>
        <tr>
          <th>供应商名称</th>
          <th>联系人</th>
          <th>调查价格</th>
          <th>规格</th>
          <th>单位</th>
          <th>交货方式</th>
          <th>付款方式</th>
          <th>运费包含</th>
          <th>损耗</th>
          <th>国标</th>
          <th>国标下差</th>
          <th>规模</th>
          <th>货期</th>
          <th>备注</th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="(item, index) in fenbaoList" :key="index">
          <td>{{item.gys}}</td>
          <td>{{item.lxr}}</td>
          <td>{{item.dcjg}}</td>
          <td>{{item.gg}}</td>
          <td>{{item.dw}}</td>
          <td>{{item.jhfs}}</td>
          <td>{{item.fkfs}}</td>
          <td>{{item.yfbh}}</td>
          <td>{{item.sh}}</td>
          <td>{{item.gb}}</td>
          <td>{{item.gbxc}}</td>
          <td>{{item.gm}}</td>
          <td>{{item.hq}}</td>
          <td>{{item.bz}}</td>
        </tr>
      </tbody>
    </table>
    <div v-if="fenbaoList.length==0" class="no_data">暂无数据</div>

  </div>
</body>
<script type="text/javascript">

  // $(".consea").click(function () {

  // })






  var vm = new Vue({
    el: "#ctrlC",
    data: function () {
      return {
        surbeyObj: {},
        fenbaoList: [],
        fuwuObj: [],
        cId: "",
        renwuID: "",
        noTex: "",
        ifTxt: false,
      }
    },
    beforeCreate: function () {
    },
    created: function () {
      var id = location.search.replace("?", "")
      console.log("iddddd", id)
      var ids = id.split(",")
      var that = this
      var url = "http://127.0.0.1:18084/materials/serviceDetails1/" + ids[0] + "/" + ids[1];
      var post = Vue.baseService.get(url);
      post.then(function (res) {
        console.log(res, "任务请求成功")
        that.fenbaoList = res
        // that.renwuID = res.id
      }, function (status) {
        if (status == !0) {
          $.Toast.error('加载失败！' + status);
        }
      })

    },
    methods: {
      handCols: function () {
        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
        parent.location.reload();//刷新父页面，注意一定要在关闭当前iframe层之前执行刷新
        parent.layer.close(index);
      },



    },

    watch: {

    }
  });
</script>

</html>